import { createApp } from 'vue'
import './style.css'
import 'lib-flexible';
import App from './App.vue'
import VueDOMPurifyHTML from 'vue-dompurify-html';


function px2rem(px:any){
  if(/%/ig.test(px)){ // 有百分号%，特殊处理，表述pc是一个有百分号的数，比如：90%
    return px
  }else{
    return (parseFloat(px) / 37.5).toFixed(2) + 'rem'
  }
}

const app = createApp(App)
app.config.globalProperties.$px2rem = px2rem
app.use(VueDOMPurifyHTML)

app.mount('#app')
